package com.sisyphus.mock.data.entities;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

/**
 * 用户收藏的帖子，中间表
 */
@Entity(tableName = "user_post_favorite")
public class UserPostFavoriteEntity {

    @PrimaryKey(autoGenerate = true)
    public Long id;

    @ColumnInfo(name = "uid")
    public Long uid;

    @ColumnInfo(name = "post_id")
    public Long postId;

    @ColumnInfo(name = "create_date")
    public Long createDate;

    public UserPostFavoriteEntity() {
    }

    @Ignore
    public UserPostFavoriteEntity(Long uid, Long postId, Long createDate) {
        this.uid = uid;
        this.postId = postId;
        this.createDate = createDate;
    }
}
